package com.chixing.day15_map;

import java.io.*;

public class InputStreamDemo {
    public static void main(String[] args)  {
        //1.创建字节读取流
        InputStream in = null;
        try {
             in = new FileInputStream("d://test1/hello.txt");
             int data;
             while ((data = in.read()) != -1){
                 System.out.print((char)data);
             }
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        } finally {//3。关闭流
            try {
                in.close();
            } catch (IOException e) {
                e.printStackTrace();
            }

        }


    }
}
